本文整理汇总了Java中org.apache.thrift.TException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java TException.printStackTrace方法的具体用法?Java TException.printStackTrace怎么用?Java TException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.thrift.TException
的用法示例。
在下文中一共展示了TException.printStackTrace方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: listAlgorithms
import org.apache.thrift.TException; //导入方法依赖的package包/类
public Set<String> listAlgorithms(){
Set<String> ret = null;
try {
ret = newClient().listAlgorithms();
transport.close();
} catch (TException x) {
x.printStackTrace();
}
return ret;
}
示例2: describeAlgorithm
import org.apache.thrift.TException; //导入方法依赖的package包/类
public List<String> describeAlgorithm(String name){
List<String> ret = null;
try {
ret = newClient().describeAlgorithm(name);
transport.close();
} catch (TException x) {
x.printStackTrace();
}
return ret;
}
示例3: performAlgorithm
import org.apache.thrift.TException; //导入方法依赖的package包/类
public Object performAlgorithm(String name, Object... params) {
Object ret = null;
try {
ret = KryoTool.toObject(newClient().performAlgorithm(name, KryoTool.toByteBuffer(params)));
transport.close();
} catch (TException x) {
x.printStackTrace();
}
return ret;
}
示例4: getActorMessage
import org.apache.thrift.TException; //导入方法依赖的package包/类
public ActorMessage getActorMessage(byte[] buffer) {
BaseByteArrayPacket packet = new BaseByteArrayPacket();
packet.fromBinary(buffer);
ActorMessage actorMessage = new ActorMessage();
try {
deserializer.deserialize(actorMessage, packet.toBinary());
} catch (TException e) {
e.printStackTrace();
}
return actorMessage;
}
示例5: getEventMessage
import org.apache.thrift.TException; //导入方法依赖的package包/类
public RemoteEventMessage getEventMessage(byte[] buffer) {
RemoteEventMessage event = new RemoteEventMessage();
try {
deserializer.deserialize(event, buffer);
} catch (TException e) {
e.printStackTrace();
}
return event;
}
示例6: deserializeEventMessage
import org.apache.thrift.TException; //导入方法依赖的package包/类
public byte[] deserializeEventMessage(RemoteEventMessage event) {
try {
return serializer.serialize(event);
} catch (TException e) {
e.printStackTrace();
return null;
}
}
示例7: getActorMessageByteArray
import org.apache.thrift.TException; //导入方法依赖的package包/类
public byte[] getActorMessageByteArray(Operation operation, TBase<?, ?> base) {
byte[] tbaseMessage = null;
ActorMessage actorMessage = new ActorMessage();
actorMessage.op = operation;
try {
actorMessage.messageRaw = getTbaseByteBuffer(base);
tbaseMessage = getOnlySerializerByteArray(actorMessage);
} catch (TException e) {
e.printStackTrace();
}
return tbaseMessage;
}
示例8: send2SessionActor
import org.apache.thrift.TException; //导入方法依赖的package包/类
/**
* 发送消息
*
* @param msg
*/
private void send2SessionActor(Object msg) {
if (msg instanceof BaseByteArrayPacket) {
ActorMessage message = new ActorMessage();
byte[] binary = ((BaseByteArrayPacket) msg).toBinary();
ByteBuffer buffer = ByteBuffer.allocate(binary.length);
buffer.put(binary);
buffer.flip();
message.messageRaw = buffer;
message.op = Operation.SESSION_RECIVE_PACKET;
byte[] actorMessage;
try {
actorMessage = thriftSerializerFactory.getActorMessage(message);
actorRef.tell(actorMessage, ActorRef.noSender());
CObject newInstance = CObject.newInstance();
newInstance.putInt(MonitorEventType.KEY, MonitorEventType.SESSEION_RECIVE_FLOW);
newInstance.putLong(MonitorEventType.SESSION_ID, sessionId);
newInstance.putDouble(MonitorEventType.SESSION_FLOW, binary.length);
newInstance.putLong(MonitorEventType.SESSION_TIME, System.currentTimeMillis());
AkkaUtil.getInbox().send(CodeBrokerSystem.getInstance().getMonitorManager(), newInstance);
} catch (TException e) {
e.printStackTrace();
}
}
}